import { createRouter, createWebHistory, createWebHashHistory  } from 'vue-router';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import('../components/Home.vue')
    },
    {
        path: '/create',
        name: 'Create',
        component: () => import('../components/Create.vue')
    },
    {
        path: '/join',
        name: 'Join',
        component: () => import('../components/Join.vue')
    },
    {
        path: '/room/:room/:user',
        name: 'Room',  
        component: () => import('../components/Room.vue')
    }
];

const router = createRouter({
    history: createWebHashHistory (),
    routes,
  });

export default router;